#ifndef ERRORS_H_
#define ERRORS_H_

/*
Copyright (C) 2011 Salil Bhagurkar

This file is part of illusion

illusion is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

illusion is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with illusion.  If not, see <http://www.gnu.org/licenses/>.
*/

#define ENONE		0

//
// Unsupported.
//

#define ENOSUP		1

//
// No such device.
//

#define ENODEV		2

//
// The called system or entity is in an invalid state.
//

#define ESTINV		3

//
// The provided data is already registered or already exists.
//

#define EDUP		4

//
// The requested data does not exist as an entry.
//

#define ENOENT		5

//
// One or more passed parameters are invalid.
//

#define EPARAM		6

//
// Permission denied.
//

#define EPERMS		7

//
// This function is not supposed to use the return path.
//

#define ERETURN		8

//
// No more data is available from this resource.
//

#define ENODATA		9

//
// One or more parameters are out of bound.
//

#define EBOUNDS		10

//
// There are insufficient resources to complete the call.
//

#define ERESRC		11

//
// VFS: There is a pending sync.
//

#define EPENDSYNC	12

//
// VFS: Sync failed.
//

#define ESYNC		13

//
// An unknown error occurred.
//
#define EFAIL		14

//
// An exception occurred. This is used as an exit code for a faulted process.
//

#define EXCEP		15

char *get_error_name(int err);

#endif /* ERRORS_H_ */
